<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>{% block title %}教育推荐系统{% endblock %}</title>
    <link
      rel="stylesheet"
      href="{{ url_for('static', filename='css/styles.css') }}"
    />
    {% block styles %}{% endblock %}
  </head>
  <body>
    <header>
      <nav class="navbar">
        <div class="container">
          <a href="{{ url_for('main.index') }}">首页</a>
          <a href="{{ url_for('course.get_all_courses') }}">课程列表</a>
          <a href="{{ url_for('recommendation.user_recommendations') }}"
            >我的推荐</a
          >
          {% if current_user.is_authenticated %}
          <a href="{{ url_for('user.profile') }}">个人中心</a>
          <a href="{{ url_for('user.logout') }}">退出登录</a>
          {% else %}
          <a href="{{ url_for('user.login') }}">登录</a>
          <a href="{{ url_for('user.register') }}">注册</a>
          {% endif %}
        </div>
      </nav>
    </header>

    <main>
      <div class="container">{% block content %}{% endblock %}</div>
    </main>

    <footer>
      <div class="container">
        <p>&copy; 2023 教育推荐系统. All rights reserved.</p>
      </div>
    </footer>

    <script src="{{ url_for('static', filename='js/scripts.js') }}"></script>
    {% block scripts %}{% endblock %}
  </body>
</html>
